
public class PhoneContact implements ContactData{
		String number;
		int zip;
		int houseNr;
		String street;
		String city;
		
		PhoneContact(){
			this ("");
		}
		PhoneContact(String n){
			this(n, "", 0, 00000, "");
		}
		PhoneContact(String n, String str, int h, int z, String c){
			number = n;
			street = str;
			city = c;
			zip = z;
			houseNr = h;
		}
		public int getLineCount() {
			return 2;
		}
		@Override
		public String getLine(int index) {
			if (index == 1)
				return number;
			return street+" " +houseNr+" "+ zip + " "+ city;
		}

		@Override
		public void sendMessage(String msg) {
			System.out.println("The postage costs too much! \"" + msg+"\"");
		}
		
		public String toString() {
			return "\t* " +number +"\n"+
				   "\t* " +street + " " + houseNr +"\n" +
				   "\t  " +zip + " " + city;		
		}
		
		public PhoneContact setNumber(String n){
			number = n;
			return this;
		}
		public PhoneContact setAdress(String str, int h, int z, String c){
			street = str;
			city = c;
			zip = z;
			houseNr = h;
			return this;
		}
}
